﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectSem3
{
    public partial class WebForm13 : System.Web.UI.Page
    {
        private DataClassesHealthDataContext dc = new DataClassesHealthDataContext();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string id = Request.QueryString["id"];
                if (id == null)
                {
                    Response.Redirect("policy.aspx");
                }
                else
                {
                    HospitalInfo hos = this.dc.HospitalInfos.Single(h => h.hospitalid.Equals(id));
                    this.LabelName.Text = hos.hospitalname;
                    this.LabelPhone.Text = hos.phoneno;
                    this.LabelLocation.Text = hos.location;
                    this.LabelURL.Text = hos.url;

                }
            }
        }

        protected void ButtonCancel_Click(object sender, EventArgs e)
        {
            Response.Redirect("policy.aspx");
        }
    }
}